package com.icloud.article.boot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.icloud.article.boot.dto.AttachmentDto;
import com.icloud.article.boot.dto.DiscussAttachmentDto;
import com.icloud.article.boot.model.Attachment;
import com.icloud.article.boot.model.DiscussAttachment;

import java.util.List;
import java.util.Map;


/**
 * 附件service
 */
public interface DiscussAttachmentService extends IService<DiscussAttachment> {

    /**
     * 批量添加
     * @param discussId 评论id
     * @param dtoList 附件
     */
    void batchAdd(Long discussId, List<DiscussAttachmentDto> dtoList);


    /**
     * 根据帖子id查询附件
     * @param discussIds 评论ids
     * @return key:评论id  value:附件列表
     */
    Map<Long, List<DiscussAttachment>> queryAttachmentCountByDisscuss(List<Long> discussIds);
}
